package com.loop.homework;

public class PersonTest {
    public static void main(String[] args) {
        //创建学生对象
        Student student = new Student();
        //给属性赋值
        student.setName("小明");
        student.setId(1001);
        student.setClassNum("12");
        student.setGrade(88);
        //创建教师对象
        Teacher teacher = new Teacher("教授","网络编程");
        //给属性赋值
        teacher.setName("李花花");
        teacher.setId(449);

        //调用各自的messagePrint()方法
        student.messagePrint();
        teacher.messagePrint();
    }
}
